private ["_group","_action_id","_object","_action_id","_player","_action","_arguments"];
_object = _this select 0;
_player = _this select 1;
_action_id = _this select 2;
_arguments = _this select 3;

_group = group player;
_released = [];
{
	if (!isplayer _x) then {
		_action = _x call XfMissionGetAction;
		if (_action == "LEAD") then {
			[_x] joinSilent grpNull;
			_released set[count _released, _x];
		};
	}
} foreach units _group;
player removeAction _action_id;
_action_id = _player getVariable "mission_lead_release_action";
if (!isnil "_action_id") then {
	_player setVariable ["mission_lead_release_action",-9999];
};
